#!/usr/bin/env python3
# coding: utf-8

import logging
import logging.config
from os import path
from pathlib import Path
from ruamel.yaml import YAML

yaml = YAML(typ='safe')
config_file = path.join(path.dirname(path.abspath(__file__)), 'log_config.yaml')
logging.config.dictConfig(yaml.load(open(config_file, 'r')))


def get_logger(name=None):
    return logging.getLogger('tcpserver.{}'.format(name))
